General Windows Control Properties, Methods, and Events
A base set of properties, methods, and events apply to controls created through the interrogation of Windows applications (OpenSpan.Adapters.Controls.Control). Definitions of these properties, methods, and events are provided in the table below. Additional properties, methods, and events are exposed based on the target type.
For example, for a RichTextBox control, the AppendText method is available (among other control-specific methods). See the following topics for more information on OpenSpan.Adapters.Windows.Targets:
Properties
Property |
Description |
Bottom |
Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area. |
BoundsRectangle |
Gets or sets the size and location of the control including its non-client elements, in pixels, relative to the parent control. (Rectangle) |
ClientRectangle |
Gets the rectangle that represents the client area of the control. |
Enabled |
Gets or sets a value that indicates whether the control can respond to user interaction. (Boolean) |
FullName |
Gets the fully qualified name of the control, such as CRM.txtName. (String) |
Focused |
Gets a value that indicates whether the control has input focus. (Boolean) |
Height |
Gets or sets the height of the control. (Int32) |
IsCreated |
Indicates whether the control has been created (matched). (Boolean) |
IsDisposed |
Property included for as part of system references. It is not, however, used in automations. |
Key |
Gets or sets the unique Key value for the control. This property is used for applications that contain cloned targets. For more information, see Cloned Controls. (String) |
Left |
Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area. (Int32) |
Location |
Gets or sets the location that represents the top left area of the control. (Point) |
MaskEventText |
See the Configure Monitored Events topic for more information on this property. |
MaskEventValue |
See the Configure Monitored Events topic for more information on this property. |
Name |
Gets or sets the name assigned to the control. (String) |
NextKey |
Sets the key value that will be assigned to the next clone created. This property is used for applications that contain cloned targets.For more information, see Cloned Controls. (String) |
Right |
Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area. (Int32) |
ScreenRectangle |
Gets the rectangle that represents the screen area of the control. |
Size |
Gets or sets the size of the control. (Size) |
TargetName |
Gets the name that was assigned to the target |
TargetType |
Gets assembly and type for the control, such as OpenSpan.Adapters.Windows.Targets.TextBox. (TargetType) |
Text |
Gets or sets the text associated with this control. (String) Note: This property will not return anything for Common List Controls as these controls do not have a Text property. |
This |
A reference to the control object. (Object) |
Timeout |
Specifies the timeout interval for the Created event in milliseconds. (Int32) |
Top |
Gets the visibility of the control. (Boolean) |
UniqueID |
Gets the identity of the control. Here is an example: WindowsAdapter-8CC89A3AD46E95C\RichTextBox-8CC89A3D72635FC |
UnmatchOnHidden |
Sets the matching status of application controls when they are hidden at runtime. Set this property to True to have the control become unmatched when hidden (it will be automatically rematched when the target is shown). Set to False to have the control remain matched when hidden. Note that if this property is set to True and the control is hidden, you cannot use the Rematch or RematchChildren methods to rematch the hidden target. For more information, see Working with Hidden Forms. |
UseKeys |
Use this property to specify whether clones of this control can be created when multiple matching targets are found. For more information, see Cloned Controls. Set to True to enable creating clones. The default is False. (Boolean) |
Visible |
Sets or gets a True/False value that indicates whether the control is displayed. |
WaitHandle |
Allows callers to wait for the component's creation signal when using the WaitAny or WaitAll components. Type: WaitHandle |
Width |
Gets or sets the width of the control. (Int32) |
Events
Event |
Description |
Click |
Occurs when the control is clicked. |
Clicking |
Occurs when the control is in the process of clicking. |
Copy |
Occurs when the text in the control has been copied by either the Ctrl+C keystroke sequence or when selected as a menu option. This event is also triggered when the Cut event occurs. When the Cut command is used (Ctrl+X or menu option), the Copy event fires and then the Cut event fires. Click the drop-down arrow on the event connection block to expose a Text parameter which outputs the text that was Copied. Note: This event is not available for all application types. For more information, see Supported Application Technologies. |
Occurs when the control is matched. For more information, see Wait For Create. |
|
Cut |
Occurs when the text in the control has been cut by either the Ctrl+X keystroke sequence or when selected as a menu option. When the Cut command is used (Ctrl+X or from menu option), the Copy event fires and then the Cut event fires. Click the drop-down arrow on the event connection block to expose a Text parameter which outputs the text that was Cut. Note: This event is not available for all application types. For more information, see Supported Application Technologies. |
Destroyed |
Occurs when the control is unmatched. |
Disposed |
Event included for as part of system references, however, it is not used in automations. |
DoubleClick |
Occurs when the control is double-clicked. |
DoubleClicking |
Occurs when the control is in the process of double clicking. |
EnabledChanged |
Occurs when the control is enabled or disabled. |
GotFocus |
Occurs when the control receives focus. |
Hidden |
Occurs after a control has been hidden. |
KeyDown |
Occurs when a key is pressed while the control has focus. |
KeyPress |
Occurs when a key is pressed while the control has focus. |
KeyUp |
Occurs when a key is released while the control has focus. |
LostFocus |
Occurs when the control loses focus. |
MouseDown |
Occurs when the mouse pointer is over the control and a mouse button is pressed. |
MouseUp |
Occurs when the mouse pointer is over the control and a mouse button is released. |
Paste |
Occurs when the text in the control has been pasted from the Windows Clipboard by either the Ctrl+V keystroke sequence or when selected as a menu option. Click the drop-down arrow on the event connection block to expose a Text parameter which outputs the text that was Pasted. Note: This event is not available for all application types. For more information, see Supported Application Technologies. |
RightClick |
Occurs when the control is right-clicked. |
RightClicking |
Occurs when the control is being right-clicked. This is a cancelable event. |
Shown |
Occurs after a control has been shown. |
TextChanged |
Occurs when the text in the control is changed. |
VisibleChanged |
Occurs when the visibility the control is changed. |
Methods
Method |
Description |
Parameters |
Return Type |
Activate |
Activates the control and gives it focus within the Studio project. |
None |
Void |
DestroyTooltip |
Deletes a tool tip from a control to which it has been assigned. |
None |
Void |
Detach |
Un-matches this control from the target that it is matched to. This method is used when an automation might need to force a control to un-match before calling the Rematch or RematchChildren method to re-match controls. Note: Rematch or RematchChildren should only be used when there is an issue that prevents matching from working correctly. |
None |
Void |
Focus |
Causes the element to receive the focus and executes the code specified by the GotFocus event. |
None |
Void |
GetClones |
Returns a collection of cloned objects. Use the GetClones method in combination with a ListLoop component to iterate over the list of cloned objects to extract individual list items. |
None |
CloneCollection |
GetEvent |
Initiates downstream logic pending the occurrence of a particular event. Click the Name parameter in the GetEvent design block to view a list of events applicable for the component. Select the event, and then create a proxy from the GetEvent result. For more information, see Get Event for Windows Controls and Forms. |
EventName name |
Event |
GetHandle |
Use to return the handle of a window. This method returns an IntPtr window handle of this target. This method is available for all Windows controls. |
None |
Int32 |
GetText |
Use to get a large text buffer from a control. |
Int32 bufferSize |
String |
Hide |
Removes the control from view. Removes the cell from view. See UnMatchOnHidden to understand how hiding an application changes control matching. Note: Avoid using this method when automating applications because some applications and controls must be on an active desktop and visible. |
None |
Void |
HideTooltip |
Causes the tool tip for the control to be hidden from view. |
None |
Void |
IsKeyAssigned |
Verifies that Key is assigned. |
String key |
Boolean |
Simulates a click by causing the Click event to fire. The event is fired asynchronously. The system executes asynchronous clicks on a separate thread. Control returns to the calling thread immediately. The PerformClick method relies on native injection to work and this is not available when you use the Chrome Universal Web Adapter to interrogate the Chrome browser. You can, however, use this methods to interrogate controls on the webpage being displayed, just not Chrome browser controls, such as Refresh, Minimize, and Maximize. |
None |
Void |
|
PerformClick |
Simulates a click by causing the Click event to fire. Click is performed at the x and y location specified by the parameters. The event is fired asynchronously. The system executes asynchronous clicks on a separate thread. Control returns to the calling thread immediately. The PerformClick method relies on native injection to work and this is not available when you use the Chrome Universal Web Adapter to interrogate the Chrome browser. You can, however, use this methods to interrogate controls on the webpage being displayed, just not Chrome browser controls, such as Refresh, Minimize, and Maximize. |
Int32 x, Int32 y |
Void |
PerformDoubleClick |
Simulates a double-click by causing the DoubleClick event to fire. Event is fired asynchronously. The system executes asynchronous clicks on a separate thread. Control returns to the calling thread immediately.
|
None |
Void |
PerformDoubleClick |
Simulates a double-click by causing the DoubleClick event to fire. Click is performed at the x and y location specified by the parameters. The event is fired asynchronously. The system executes asynchronous clicks on a separate thread. Control returns to the calling thread immediately.
|
Int32 x, Int32 y |
Void |
PerformRightClick |
Simulates a right-click by causing the RightClick event to fire. The event is fired asynchronously. The system executes asynchronous clicks on a separate thread. Control returns to the calling thread immediately.
|
None |
Void |
PerformRightClick |
Simulates a right-click by causing the RightClick event to fire. RightClick is performed at the x and y location specified by the parameters. The event is fired asynchronously. The system executes asynchronous clicks on a separate thread. Control returns to the calling thread immediately. |
Int32 x, Int32 y
|
Void
|
PerformSynchronousClick |
Simulates a click by causing the Click event to fire. The event is fired synchronously. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
None |
Void |
PerformSynchronousClick |
Simulates a click by causing the Click event to fire. The event is fired synchronously. Note: This method is not implemented for Java version 1.4 - 1.6 controls. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
Int32 timeout |
Void |
PerformSynchronousClick |
Simulates a click by causing the Click event to fire. Click is performed at the x and y location specified by the parameters. The event is fired synchronously. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
Int32 x, Int32 y
|
Void |
PerformSynchronousClick |
Simulates a click by causing the Click event to fire. Click is performed at the x and y location specified by the parameters. The event is fired synchronously. Note: This method is not implemented for Java version 1.4 - 1.6 controls. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
Int32 timeout, Int32 x, Int32 y
|
Void |
PerformSynchronousDoubleClick |
Simulates a double-click by causing the DoubleClick event to fire. The event is fired synchronously. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
None |
Void |
PerformSynchronousDoubleClick |
Simulates a double-click by causing the DoubleClick event to fire. The event is fired synchronously. Note: This method is not implemented for Java version 1.4 - 1.6 controls. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
Int32 timeout |
Void |
PerformSynchronousDoubleClick |
Simulates a double-click by causing the DoubleClick event to fire. Click is performed at the x and y location specified by the parameters. The event is fired synchronously. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
Int32 x, Int32 y |
Void |
PerformSynchronousDoubleClick |
Simulates a double-click by causing the DoubleClick event to fire. Click is performed at the x and y location specified by the parameters. The event is fired synchronously. Note: This method is not implemented for Java version 1.4 - 1.6 controls. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
Int32 timeout, Int32 x, Int32 y |
Void |
PerformSynchronousRightClick |
Simulates a right-click by causing the RightClick event to fire. The event is fired synchronously. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
None |
Void |
PerformSynchronousRightClick |
Simulates a right-click by causing the RightClick event to fire. The event is fired synchronously. Note: This method is not implemented for Java version 1.4 - 1.6 controls. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
Int32 timeout
|
Void |
PerformSynchronousRightClick |
Simulates a right-click by causing the RightClick event to fire. Click is performed at the x and y location specified by the parameters. The event is fired synchronously. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
Int32 x, Int32 y
|
Void |
PerformSynchronousRightClick |
Simulates a right-click by causing the RightClick event to fire. Click is performed at the x and y location specified by the parameters. The event is fired synchronously. Note: This method is not implemented for Java version 1.4 - 1.6 controls. Synchronous clicks are executed on the calling thread. The method waits for all click messages to be processed. |
Int32 timeout, Int32 x, Int32 y |
Void |
Rematch |
Refreshes matching on the control and all child controls. If the control is currently matched, Studio detaches (unmatches) the control and children before attempting to rematch. If the control is currently unmatched, you can only call Rematch if the parent is matched. |
None |
Void |
RematchChildren |
Refreshes matching on all objects under the control. Set the detach property to True to unmatch all targets before attempting to rematch. |
Boolean detach |
Void |
ResetState |
Resets all component properties to their initial values. |
None |
Void |
SendKeys |
Sends a key command to a control. For more information, see SendKeys Method. |
String keys, Boolean focus |
Void |
SetNextKey |
Sets the key for the control when the UseKeys property is True, indicating that clones of this control can be created when multiple matching targets are found. For more information, see Cloned Controls. |
String key |
Void |
Show |
Makes the control visible after the Hide method has been called. See UnMatchOnHidden to understand how hiding an application changes control matching. |
None |
Void |
ShowContextMenu |
Displays a context menu associated with the control. |
None |
Void |
ShowContextMenu |
Displays a cotext menu associated with the control. The menu is displayed at the x and y location, as specified by the parameters. |
Int32 x, Int32 y |
Void |
ShowTooltip |
Creates a tool tip for the control. There are five overloads of this method (1, 2, 3, 5, 7 parameters).For more information, see Using the ShowToolTip Method. |
String text, String title, ToolTipAnchorPosition anchorPosition, Color textColor, Color backgroundColor, Int32 maxWidth, ToolTipIcon icon |
Void |
WaitForCreate |
Waits for the control to be created (matched). Returns True if the control is created before the WaitTimeout period elapses. Otherwise, it returns False. For more information, see Wait For Create. |
None |
Boolean |
WaitForCreate |
Waits for the control to be created (matched). Returns True if the control is created before the specified number of milliseconds has elapsed. Otherwise, it returns False.For more information, see Wait For Create. |
Int32 milliseconds
|
Boolean |
Privacy | Trademarks | Terms of Use | Feedback
Updated: 18 June 2020
© 2016 - 2020 Pegasystems Inc. Cambridge, MA All rights reserved.